package com.dmap.admin.bo.backgroundv2;

import com.dmap.admin.po.User;
import com.dmap.base.pojo.BasePojo;

/**
 * \* User: helei
 * \* Date: 04/05/18
 * \* Description:
 * \
 */
public class UserV2Bo extends BasePojo {
    private String id;//主键id
    private String account;//用户账号
    private String name;
    private String nickname;//用户呢称
    private String handphone;//手机号
    private String email;
    private Integer sex;//性别：0保密（默认），1男，2女
    private Long birthday;
    private String province;//省
    private String city;//市
    private String position;//职务
    private String companyId;
    private String companyName;//所在公司名称
    private Integer companyType;//公司类型：1.总公司， 2分公司
    private String creatorId;//该条记录是由谁创建的
    private String editorId;//最后编辑者id
    private String creatorAccount;//创建者账号
    private String editorAccount;//最后更新者账号
    private String departmentId;
    private String departmentName;
    private String headImageUrl;//用户头像url
    private Integer status;//状态：1正常，2禁用
    private Integer loginWrongNum;//登陆错误数
    private Integer userType;//用户类型：1.管理员，2.用户
    private Long createTime;//创建时间
    private Long updateTime;//最后更新时间

    private Long lastLoginTime = 0L;//最后登陆时间
    private int loginTimes;//登录次数

    public UserV2Bo(User user) {
        this.id = user.getId().toString();
        this.account = user.getAccount();
        this.name = user.getName();
        this.nickname = user.getNickname();
        this.handphone = user.getHandphone();
        this.email = user.getEmail();
        this.sex = user.getSex();
        this.birthday = user.getBirthday();
        this.province = user.getProvince();
        this.city = user.getCity();
        this.position = user.getPosition();
        this.companyId = user.getCompanyId().toString();
        this.companyName = user.getCompanyName();
        this.companyType = user.getCompanyType();
        this.creatorId = user.getCreatorId().toString();
        this.editorId = user.getEditorId().toString();
        this.creatorAccount = user.getCreatorAccount();
        this.editorAccount = user.getEditorAccount();
        this.departmentId = user.getDepartmentId().toString();
        this.departmentName = user.getDepartmentName();
        this.headImageUrl = user.getHeadImageUrl();
        this.status = user.getStatus();
        this.loginWrongNum = user.getLoginWrongNum();
        this.userType = user.getUserType();
        this.createTime = user.getCreateTime();
        this.updateTime = user.getUpdateTime();
    }

    public String getCreatorAccount() {
        return creatorAccount;
    }

    public void setCreatorAccount(String creatorAccount) {
        this.creatorAccount = creatorAccount;
    }

    public String getEditorAccount() {
        return editorAccount;
    }

    public void setEditorAccount(String editorAccount) {
        this.editorAccount = editorAccount;
    }

    public Long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Long updateTime) {
        this.updateTime = updateTime;
    }

    public int getLoginTimes() {
        return loginTimes;
    }

    public void setLoginTimes(int loginTimes) {
        this.loginTimes = loginTimes;
    }

    public String getEditorId() {
        return editorId;
    }

    public void setEditorId(String editorId) {
        this.editorId = editorId;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getHandphone() {
        return handphone;
    }

    public void setHandphone(String handphone) {
        this.handphone = handphone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public Long getBirthday() {
        return birthday;
    }

    public void setBirthday(Long birthday) {
        this.birthday = birthday;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public String getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(String departmentId) {
        this.departmentId = departmentId;
    }

    public String getDepartmentName() {
        return departmentName;
    }

    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }

    public String getHeadImageUrl() {
        return headImageUrl;
    }

    public void setHeadImageUrl(String headImageUrl) {
        this.headImageUrl = headImageUrl;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getLoginWrongNum() {
        return loginWrongNum;
    }

    public void setLoginWrongNum(Integer loginWrongNum) {
        this.loginWrongNum = loginWrongNum;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    public Long getLastLoginTime() {
        return lastLoginTime;
    }

    public void setLastLoginTime(Long lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }

    public Integer getUserType() {
        return userType;
    }

    public void setUserType(Integer userType) {
        this.userType = userType;
    }

    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public Integer getCompanyType() {
        return companyType;
    }

    public void setCompanyType(Integer companyType) {
        this.companyType = companyType;
    }

    public String getCreatorId() {
        return creatorId;
    }

    public void setCreatorId(String creatorId) {
        this.creatorId = creatorId;
    }
}